﻿@model SecondaryLoginViewModel
@{
    ViewData["Title"] = "Two-factor/U2F authentication";
    Layout = "_LayoutSignedOut";
    ViewBag.ShowTitle = false;
}

@section PageHeadContent {
    <style>.twoFaBox + .twoFaBox { margin-top: var(--btcpay-space-l); padding-top: var(--btcpay-space-l); border-top: 1px solid var(--btcpay-body-border-light); }</style>
}

@section PageFootContent {
    <partial name="_ValidationScriptsPartial" />
}

@if (Model.LoginWith2FaViewModel != null && Model.LoginWithFido2ViewModel != null && Model.LoginWithLNURLAuthViewModel != null)
{
    <div asp-validation-summary="ModelOnly" class="@(ViewContext.ModelState.ErrorCount.Equals(1) ? "no-marker" : "")"></div>
}
else if (Model.LoginWith2FaViewModel == null && Model.LoginWithFido2ViewModel == null && Model.LoginWithLNURLAuthViewModel == null)
{
    <div class="row">
        <div class="col-lg-12">
            <h2 class="bg-danger" text-translate="true">2FA and U2F/FIDO2 and LNURL-Auth Authentication Methods are not available. Please go to the https endpoint.</h2>
            <hr class="danger">
        </div>
    </div>
}

<div class="row justify-content-center">
    @if (Model.LoginWith2FaViewModel != null)
    {
        <partial name="LoginWith2fa" model="@Model.LoginWith2FaViewModel"/>
    }
    @if (Model.LoginWithFido2ViewModel != null)
    {
        <partial name="LoginWithFido2" model="@Model.LoginWithFido2ViewModel"/>
    }
    @if (Model.LoginWithLNURLAuthViewModel != null)
    {
        <partial name="LoginWithLNURLAuth" model="@Model.LoginWithLNURLAuthViewModel"/>
    }
</div>
